<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\api\controller;




use app\common\model\CourseQuestion;
use app\common\model\QuestionCategory;

/**
 * BusinessSchool控制器
 */
class BusinessSchool extends ApiBase
{







    /**
     * 最近更新课程
     */
    public function recent_course(){
        return $this->apiReturn($this->logicBusiness->recent_course($this->param));
    }

    /**
     * 热门课堂
     */
    public function hot_course(){
        return $this->apiReturn($this->logicBusiness->hot_course());
    }

    /**
     * 推荐课堂
     */
    public function recommended_courses(){
        return $this->apiReturn($this->logicBusiness->recommended_courses());
    }


    /**
     * 课堂详情
     */
    public function course_info(){
        return $this->apiReturn($this->logicBusiness->course_info($this->param));
    }


    /***
     * 购买课程
     */
    public function  buy_course(){

        return $this->apiReturn($this->logicBusiness->buy_course($this->param));


    }

    /**
     * 课程留言接口
     */
    public function collections_message(){
        return $this->apiReturn($this->logicBusiness->collections_message($this->param));
    }



    /***
     * 留言回复接口
     */
    public function  collections_message_reply(){

        return $this->apiReturn($this->logicBusiness->collections_message_reply($this->param));


    }

    /**
     * 课程内容详情
     */
    public function course_collection_info(){
        return $this->apiReturn($this->logicBusiness->course_collection_info($this->param));
    }

    /***
     * 内容详情点赞
     */
    public function  collection_praise(){

        return $this->apiReturn($this->logicBusiness->collection_praise($this->param));


    }
    /***
     * 课程打赏
     */
    public function  reward_colletctions(){

        return $this->apiReturn($this->logicBusiness->reward_colletctions($this->param));


    }


    /***
     * 用户通知
     */
    public function  course_notice(){

        return $this->apiReturn($this->logicBusiness->course_notice($this->param));


    }


    /***
     * 在线解答
     */
    public function  online_answer(){


        return $this->apiReturn($this->logicBusiness->answer_list($this->param));



    }

    /***
     * 问题分类
     */
    public function  answer_category(){


        return $this->apiReturn(QuestionCategory::where(['status'=>1])->order('sort desc,id desc')->select());



    }

    /***
     * 问题回复
     */
    public function  answer_reply(){


        return $this->apiReturn($this->logicBusiness->answer_reply($this->param));



    }




    /**
     * 用户通知列表接口
     */
    public function bbs_notice(){
        return $this->apiReturn($this->logicBusiness->bbs_notice($this->param));
    }

    /**
     * 用户通知列表接口
     */
    public function clear_bbs_notice(){
        return $this->apiReturn($this->logicBusiness->clear_bbs_notice($this->param));
    }

    /**
     * 用户主页
     */
    public function user_homepage(){

        return $this->apiReturn($this->logicBusiness->user_homepage($this->param));

    }

    /**
     * 我的帖子/他的帖子
     */
    public function my_bbs(){

        return $this->apiReturn($this->logicBusiness->my_bbs($this->param));

    }

    /**
     * 我的回帖
     */
    public function my_bbs_comment(){

        return $this->apiReturn($this->logicBusiness->my_bbs_comment($this->param));

    }

    /**
     * 我的关注
     */
    public function my_follow(){

        return $this->apiReturn($this->logicBusiness->my_follow($this->param));

    }

    /**
     * 正在关注
     */
    public function follow_user(){

        return $this->apiReturn($this->logicBusiness->follow_user($this->param));

    }


    /**
     * 获取可用钱包流水详情
     */
    public function vailable_account_log_detail(){

        return $this->apiReturn($this->logicBusiness->vailable_account_log_detail($this->param));

    }

    /**
     * 获取可用钱包首页详情
     */
    public function vailable_account_index(){

        return $this->apiReturn($this->logicBusiness->vailable_account_index($this->param));

    }



}
